Embodiments of the present application relate generally to the MPEG packet transport, and more particularly to a system and method for corelating MPEG transport packets.
The introduction of broadband networks, access devices such as set-top boxes, and media such as DVD disks recorded with digitally compressed audio, video and data signals, for example, which utilize motion Picture Expert Group (MPEG) compression protocols, may provide sound and picture quality that is virtually indistinguishable from the original material. The One of the commonly-used MPEG protocols called MPEG-2, provides the necessary protocols and infrastructure that may be used for transferring digitally compressed audio, video and data signals. A detailed description of the MPEG 2 standard is published as ISO/IEC Standard 13818. As broadband networks continue to evolve, there is a need to provide access for legacy devices to ensure interoperability with legacy and disparate systems.
An MPEG program may contain a plurality of data streams. These may include the elementary stream (ES), a packetized elementary stream (PES), a transport stream (TS) and a program specific information stream. An MPEG encoder typically creates the ESs by utilizing one or more analog video and audio content. The MPEG encoder may be configured to apply MPEG compression algorithms to the source content, which may result in an individual compressed ES for each audio and video stream. This encoded and compressed data stream may be decoded in a set-top box and viewed on a TV. Factors such as a bit rate of the encoded stream, quality of the original source content and encoder algorithm may typically determine the quality of the output signal. Notably, the type of encoding may determine whether another system will be able to decode and interpret a received MPEG data stream. In this regard, the other system may be a legacy or disparate system.
In a typical MPEG data stream, the length of individual ESs may be equivalent to the length of the program. Each ES may be contained in a plurality of variable-length packets called a PES. The PES may include a header that may precede one or more payload bytes. The header may include information pertaining to the encoding process required by the MPEG decoder to decompress and decode a received ES. Each individual ES may have a corresponding PES and any encoded audio and video information may still reside in separate PESs. Notably, the PES may be viewed primarily as a logical construct and is not intended to be utilized for data interchange, transport, and interoperability. Notwithstanding, the PES may be utilized for conversion between transport streams (TSs) and program information streams (PSs).
The TS and PS may be formed by multiplexing a plurality of PES packets. The TS may include a plurality of additional packets that may contain tables, which may be necessary for de-multiplexing the TS. The tables may be collectively called program specific information (PSI). To maintain synchronization and timing, null packets may also be inserted to fill the intervals between information-bearing packets. Timing information for an associated program may be carried by specific packets. One type of timing information may be called the program clock reference (PCR). The PCR may be located in one of the optional header fields of the TS packet. During operation, the PCR may permit the decoder to synchronize its clock to the same frequency as that of the original encoder's clock frequency. TS packets may have a fixed length of 188 bytes, which may include a header having a minimum size of 4 bytes and a maximum payload of 184 bytes.
FIG. 1 is a diagram of the structure for an exemplary MPEG transport stream 100. Referring to FIG. 1, TS 100 may include a header 102 and payload 104. Header 102 may include the following fields: synchronization (SYNC) 106, transport error indicator 108, payload unit start indicator 110, transport priority 112, packet ID (PID) 114, transport scrambling control 116, adaptation field control 118, continuity counter 120, adaptation field 122, and a plurality of PES, namely PES1 124, PES2 126, . . . , PESn 130. The adaptation field 118 may further include the following fields: adaptation field length 132, discontinuity indicator 134, random access indicator 136, PES priority 138, flags 140, optional fields 142 and stuffing bytes 144. The optional fields 142 may further include the following: program clock reference (PCR) 146, OPCR 148, a splice countdown 150, private data length 152, adaptation field extension length 154, flags 156 and optional field 158.
The TS 100 may include variable length PES that may be divided into fixed length packets for use by a transmission system. In this regard, the information added by the TS is additional to the information contained in the headers of the PESs. SYNC byte 106 may be used to delineate the beginning and ending of TS packet 100. The transport error indicator 108 may indicate when there is an error in a packet or block. This may be particularly useful for error block testing. PID 114 may be a unique identifier that may identify every video and audio stream. Additionally, each PSI table may have a unique PID 114. The PID 114 may be utilized for identifying a channel and may include any information required for locating, identifying and reconstructing programs. Some PIDs are reserved for specific uses by the MPEG protocol. PID values may be stored in PSI tables. In order to ensure that all the audio, video and data for a program are properly decoded, it may be critical to ensure that the PIDs are correctly assigned and that the PSI tables correspond with their associated audio and video streams.
PCR 146 may have 42 bits, 9 bits of which may be incremented at 27 MHz and 33 bits that may be incremented at 90 kHz upon rollover of the 9 bits. The bits in PCR 146 may provide program clock recovery information that may be utilized for synchronization. PCR 146 may be used to provide a clock recovery mechanism for MPEG programs. A 27 MHz system time clock (STC) signal may typically be used for encoding MPEG signals. Decoding of the signal requires a clock that may be locked to the encoder's STC of 27 MHz. Notably, the PCR 146 may be utilized by the decoder to regenerate a local clock signal that is locked to the STC. Whenever a program is placed in the transport stream, a 27 MHz time stamp may be inserted into the PCR 146. When the signal is received by a decoder, the decoder may compare the value in the PCR 146 with the frequency of its local voltage controlled oscillator (VCO) and adjust the VCO to ensure that the VCO is locked to the frequency specified by the PCR 146. To ensure accuracy, the PCR 146 may be updated with the STC every about 100 ms.
The continuity counter (CC) 120 may be used to determine when packets are lost or repeated. It may include a 4-bit field, which may be repeatedly incremented from zero to 15 for each PID. Discontinuity counter 134 may permit a decoder to handle discontinuities in the transport stream. Discontinuity counter 134 may indicate a time base such as the PCR 146 and continuity counter 120 discontinuities. Random access indicator 136 may be configured to indicate whether the next PES packet in the PID stream contains a video-sequence header or the first byte of an audio frame. Splice countdown 150 may be configured to indicate the number packets of the same PID number to a splice point occurring at the start of PES packets.
Two or more MPEG TSs may be multiplexed to form a multi-program TS. In a case where the TC may include a single MPEG TS, the output of the multiplexer may be called a single program TS (SPTS). Furthermore, a number of SPTSs may be multiplexed to create a multi-program TS. In some cases, the program may include one or more ESs that may have a similar time reference. This may occur, for example, in a movie that has video and its corresponding audio content.
PSI may include a set of tables that may be part of a TS. The tables in the PSI may be required while de-multiplexing the TS and for matching PIDs to their corresponding programs. Once the PIDs are matched to their corresponding programs, the TS may be decoded by assembling and decompressing program contents. Typically, in order to determine which audio and video PIDs contain the corresponding content for a particular program, a program map table (PMT) may be decoded. Each program may have its own PMT bearing a unique PID value. The PAT may be decoded in order to determine which PID contains the desired program's PMT. The PAT may function as the master PSI table with PID value which may always be equal to zero(0). In a case where the PAT cannot be found and decoded in the TS, no programs may be available for presentation.
The PSI table may be refreshed periodically at a rate that is fast enough to allow a set-top box to go through program recovery and decompression processes. This may be necessary to ensure real-time user interaction. The PSI may also be used to determine the accuracy and consistency of PSI contents. Notwithstanding, during programs changes or modification of multiplexer provisioning, there may be packets which have a PID value present in the TS, but have no corresponding reference in the PSI. Additionally, the PSI may have references to one or more packets in the PID that are not present in the TS.
In existing MPEG compliant systems, audio/video services may be carried using some or all of the 188 bytes of the packet, called transport packets. Multiple services may be differentiated using a packet identifier (PID) contained in a packet header called the transport packet header. Transport packets from various services may be multiplexed and transmitted on the same physical medium. Exemplary media may include, copper, coaxial cable, wireless, optical and any combination thereof. On the receiver side transport packets may be demultiplexed and data may be separated for each service. For example, audio packets may be separately de-multiplexed from video packets.
Transport packets may include three fields, namely a 4-byte header, an optional adaptation field and a packet payload. The packet payload may not be altered by multiplexing or transmitting equipment, except during processing which may include data encryption and decryption. In generally, encryption may be done once within a typical MPEG processing system. Notwithstanding, some fields of adaptation field may be changed by multiplexing and transmission equipment. Typically, packet order within a PID channel may be maintained from an MPEG encoder to an MPEG receiver but packet order among multiple PID streams may not guaranteed by during transmission by any transmitting equipment. In cases where co-relation of packets from different PIDs may be required, packet position in a stream cannot be utilized since packet order among multiple PID channels may be altered.
Further limitations and disadvantages of conventional and traditional approaches will become apparent to one of skill in the art, through comparison of such systems with the present invention as set forth in the remainder of the present application with reference to the drawings.